import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UserLayoutComponent } from './_layout/layout.component';
import { UserInfoBasicComponent } from './basic/userinfo-basic.component';
import { UserSecurityComponent } from './security/security-component';
import { ChangePwdComponent } from './security/changepwd/change-pwd.component';
import { SecurityPhoneComponent } from './security/secphone/security-phone.component';
import { ThirdBindComponent } from './security/bind/third-bind.component';

const routes: Routes = [
  {
    path: '',
    component: UserLayoutComponent,
    children: [
      { path: '', redirectTo: 'basic', pathMatch: 'full' },
      { path: 'basic', component: UserInfoBasicComponent },
      { path: 'security', component: UserSecurityComponent },
      { path: 'changepwd', component: ChangePwdComponent },
      { path: 'secphone', component: SecurityPhoneComponent },
      { path: 'bind', component: ThirdBindComponent },
    ],
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class UserRoutingModule {}
